<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  var str = "aaabcabc1245a,AAA-zhjaa+bbg_f28adf-a,1247,sdf&gdAAbbc456#a,jvfabcccc$12 43jabcabcsg";

  console.log(str)


  console.log(str.replace( /a/ , "啊"));
  console.log(str.replace( /a/g , "啊"));
  console.log(str.replace( /a|A/g , "啊"));
  console.log(str.replace( /a/ig , "啊"));
  console.log(str.replace( /a|b|c|d|e|f|g/ig , "啊"));
  console.log(str.replace( /[abcdefg]/ig , "啊"));
  console.log(str.replace( /[a-z]/ig , "啊"));
  console.log(str.replace( /a-z/ig , "啊"));
  console.log(str.replace( /abc/ig , "啊"));
  console.log(str.replace( /a+/g , "啊"));
  console.log(str.replace( /\+/g , "啊"));
  console.log(str.replace( /a\+/g , "啊"));
  console.log(str.replace( /(abc)+/ig , "啊"));
  console.log(str.replace( /[0-9]/g , "啊"));
  console.log(str.replace( /[0-9]+/g , "啊"));
  console.log(str.replace( /\d+/g , "啊"));
  console.log(str.replace( /[^0-9]+/g , "啊"));
  console.log(str.replace( /[^\d]+/g , "啊"));
  console.log(str.replace( /\D+/g , "啊"));
  console.log(str.replace( /\w+/g , "啊"));
  console.log(str.replace( /[a-z,0-9,_]+/g , "啊"));
  console.log(str.replace( /[a-z0-9_]+/g , "啊"));
  console.log(str.replace( /[^a-z0-9_]+/g , "啊"));
  console.log(str.replace( /\W+/g , "啊"));
  console.log(str.replace( /[^a-zA-Z0-9_]+/g , "啊"));

  console.log(str);


  // =======


  var str2 = "http:";
  var str3 = "https:";
  var str4 = "httpss:";
  var str5 = "httpssssssss:";

  var reg = /https*:/;

  console.log(str2.replace(reg, "*"))
  console.log(str3.replace(reg, "*"))
  console.log(str4.replace(reg, "*"))
  console.log(str5.replace(reg, "*"))

  
</script>
</html>